

//引入util继承模块

var util=require("util");

function  Person() {
    this.eat=function () {
        console.log("吃套餐来一份");

    }
}

Person.prototype.speak=function () {
    console.log("666");
}

function Man() {

}


util.inherits(Man,Person);

var man1=new Man();

man1.speak();